08. Compile and Execute

07 Compile And Execute

1- Change your working directory and navigate to your source code:

$ cd Desktop

2- While in Desktop, Compile your code with g++:

$ g++ newfile.cpp -o app

3- After compiling, run your program:

$ ./app

4- After running the executable file, check if “Hello, World!” is displayed in your terminal :

C++ Compiler

Which compiler can you use to compile your C++ program on a Linux terminal? Select all that apply.

SOLUTION:
  • gcc
  • g++